package com.gaohe.hotal.service.impl;

import java.util.List;
import com.gaohe.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gaohe.hotal.mapper.HotFlowMapper;
import com.gaohe.hotal.domain.HotFlow;
import com.gaohe.hotal.service.IHotFlowService;

/**
 * 财务流水Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-02
 */
@Service
public class HotFlowServiceImpl implements IHotFlowService 
{
    @Autowired
    private HotFlowMapper hotFlowMapper;

    /**
     * 查询财务流水
     * 
     * @param flowId 财务流水主键
     * @return 财务流水
     */
    @Override
    public HotFlow selectHotFlowByFlowId(Long flowId)
    {
        return hotFlowMapper.selectHotFlowByFlowId(flowId);
    }

    /**
     * 查询财务流水列表
     * 
     * @param hotFlow 财务流水
     * @return 财务流水
     */
    @Override
    public List<HotFlow> selectHotFlowList(HotFlow hotFlow)
    {
        return hotFlowMapper.selectHotFlowList(hotFlow);
    }

    /**
     * 新增财务流水
     * 
     * @param hotFlow 财务流水
     * @return 结果
     */
    @Override
    public int insertHotFlow(HotFlow hotFlow)
    {
        hotFlow.setCreateTime(DateUtils.getNowDate());
        return hotFlowMapper.insertHotFlow(hotFlow);
    }

    /**
     * 修改财务流水
     * 
     * @param hotFlow 财务流水
     * @return 结果
     */
    @Override
    public int updateHotFlow(HotFlow hotFlow)
    {
        hotFlow.setUpdateTime(DateUtils.getNowDate());
        return hotFlowMapper.updateHotFlow(hotFlow);
    }

    /**
     * 批量删除财务流水
     * 
     * @param flowIds 需要删除的财务流水主键
     * @return 结果
     */
    @Override
    public int deleteHotFlowByFlowIds(Long[] flowIds)
    {
        return hotFlowMapper.deleteHotFlowByFlowIds(flowIds);
    }

    /**
     * 删除财务流水信息
     * 
     * @param flowId 财务流水主键
     * @return 结果
     */
    @Override
    public int deleteHotFlowByFlowId(Long flowId)
    {
        return hotFlowMapper.deleteHotFlowByFlowId(flowId);
    }
}
